<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!-- pagination begin -->
<div class="page">
	<div class="number">第&nbsp;${page.pageNumber }&nbsp;页&nbsp;(共&nbsp;${page.totalPage }&nbsp;页)</div>
	<div class="ui borderless pagination menu secondary">
		<a class="item" href="${_CTX_PATH_ }/home/${id}?p=${page.hasPre == true ? page.pageNumber - 1 : 1}"><i class="icon left arrow"></i>前一页</a>
		<c:forEach	items="${page.pages }" var="item" varStatus="status">
			<!-- Last <...> -->
			<c:if test="${status.index == page.pages.size() - 1 && page.pages.size() > 1 && page.pages[page.pages.size() - 2] != page.totalPage - 1 }"><span class="item">...</span></c:if>
			
			<a class="item${page.pageNumber == item ? ' active' : ''}" href="${_CTX_PATH_ }/home/${id}?p=${item}">${item }</a>
			
			<!-- First <...> -->
			<c:if test="${status.index == 0 && page.pages.size() > 2 && page.pages[1] != 2}"><span class="item">...</span></c:if>
		</c:forEach>
		<a class="item" href="${_CTX_PATH_ }/home/${id}?p=${page.hasNext == true ? page.pageNumber + 1 : page.totalPage}">后一页<i class="icon right arrow"></i></a>
	</div>
	<div class="clear"></div>
</div>
<!-- pagination end -->